home *** CD-ROM | disk | FTP | other *** search
/ AI Game Programming Wisdom / AIGameProgrammingWisdom.iso / SourceCode / 02 Useful Techniques / 08 Zarozinski / src / ffllapi / MOMDefuzzVarObj.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-11-13  |  1.9 KB  |  65 lines

  1. //
  2. // File:    MOMDefuzzVarObj.h
  3. //
  4. // Purpose:    Variable class for Mean of Maximum defuzzification Method.
  5. //
  6. // Copyright ⌐ 2001 Louder Than A Bomb! Software
  7. //
  8. // This file is part of the FFLL (Free Fuzzy Logic Library) project (http://ffll.sourceforge.net)
  9. // It is released under the BSD license, see http://ffll.sourceforge.net/license.txt for the full text.
  10. //
  11.  
  12.  
  13. #if !defined(AFX_MOMDefuzzVarObj_H__23D883BE_7100_4E65_BA78_7CAA820A6B69__INCLUDED_)
  14. #define AFX_MOMDefuzzVarObj_H__23D883BE_7100_4E65_BA78_7CAA820A6B69__INCLUDED_
  15.  
  16. #include "DefuzzVarObj.h"
  17.  
  18. class FuzzyOutVariable;
  19. class MOMDefuzzSetObj;
  20.  
  21. // 
  22. // Class:    MOMDefuzzVarObj
  23. //
  24. // Variable object for the Mean of Maximum Defuzzification Method
  25. //
  26. // This defuzzification method returns the "MoM" of the set
  27. // with the highest DOM.  The Mean of Max refers to the max
  28. // of the member function's nodes.  For example, in a trianle
  29. // member func the max is always the top point in the triangle,
  30. // so that's the 'x' position returned.  If we're dealing with a 
  31. // trapezoid term that has 2 nodes at the highest DOM, we take
  32. // the average of them (the mean) and use that as the 'x' value.
  33.  
  34.  
  35. class MOMDefuzzVarObj : public DefuzzVarObj  
  36. {
  37.     ////////////////////////////////////////
  38.     ////////// Member Functions ////////////
  39.     ////////////////////////////////////////
  40.  
  41.     public:
  42.         // constructor/destructor funcs
  43.         MOMDefuzzVarObj();// No function body for this. Explicitly disallow auto-creation of it by the compiler
  44.         MOMDefuzzVarObj(FuzzyOutVariable* _parent);
  45.         virtual ~MOMDefuzzVarObj();
  46.  
  47.         // get functions
  48.         int get_defuzz_type() const ;
  49.  
  50.         // misc functions
  51.          RealType calc_value(DOMType* out_set_dom_arr );
  52.  
  53.     protected:
  54.  
  55.          // get functions
  56.         MOMDefuzzSetObj* get_set_defuzz_obj(int set_idx) const;
  57.  
  58. }; // end class MOMDefuzzVarObj
  59.  
  60. #else
  61.  
  62. class MOMDefuzzVarObj;
  63.  
  64. #endif // !defined(AFX_MOMDefuzzVarObj_H__23D883BE_7100_4E65_BA78_7CAA820A6B69__INCLUDED_)
  65.